<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Cache-Control" content="No-Cache">
	<meta http-equiv="Pragma" content="No-Cache">

	<title>운세의 신</title>

	<link rel="stylesheet" type="text/css" href="/css/common.css">

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script src="/js/utility/common_util.js"></script>
	<script src="/js/common_basic.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
		});
	</script>
</head>
<body>
<div id="wrap">
	<!-- Contents -->
	<div id="content">
		<h2><font color="red"><?=$_GET['user_id']?></font>님의 활동이력</h2>
		<div>
			<h2>운세 이용 내역 (캐쉬,포인트,이용권 사용내역)</h2>
			<table class="basicTable" width="100%" cellpadding="2" cellspacing="1" border="0">
				<thead>
					<tr>
						<th>일시</th>
						<th>서비스명</th>
						<th>캐쉬</th>
						<th>포인트</th>
						<th>이용권</th>
						<th>VIP/개별</th>
						<th>숨김</th>
						<th>운세입력값</th>
					</tr>
				</thead>
				<tbody>
<?	foreach ($service_list as $item) {
		$payment_type = '-';
		if (!empty($item['coupon_name'])) {
			if (!empty($item['ticket_idx'])) {
				$payment_type = '개별이용권';
			} else {
				$payment_type = 'VIP회원권';
			}
		}
?>
					<tr>
						<td align="center"><?=$item['create_dt']?></td>
						<td align="center"><?=$item['service_name']?></td>
						<td align="center"><?=$item['cash']!=0 ? number_format($item['cash']) : '-'?></td>
						<td align="center"><?=$item['point']!=0 ? number_format($item['point']) : '-'?></td>
						<td align="center"><?=!empty($item['coupon_name']) ? $item['coupon_name'] : '-'?></td>
						<td align="center"><?=$payment_type?></td>
						<td align="center"><?=$item['secret_yn']=='Y' ? '숨김' : '보임'?></td>
						<td align="center"><input type="text" size="40" value="<?=$item['param_values']?>" /></td>
					</tr>
<?	} ?>
				</tbody>
				<tfoot>
					<tr>
						<td colspan="14">
							<?// include_once $_SERVER['DOCUMENT_ROOT'].'/include/board/page_navi.php'; ?>
						</td>
					</tr>
				</tfoot>
			</table>
		</div>

		<div>
			<h2>포인트 충전/사용 내역</h2>
			<table class="basicTable" width="100%" cellpadding="2" cellspacing="1" border="0">
				<thead>
					<tr>
						<th>충전일시</th>
						<th>구분</th>
						<th>캐쉬</th>
						<th>포인트</th>
						<th>내역</th>
					</tr>
				</thead>
				<tbody>
<?	foreach ($point_list as $item) { ?>
					<tr>
						<td align="center"><?=$item['create_dt']?></td>
						<td align="center"><?=!empty($item['point_type']) ? $item['point_type'] : '-'?></td>
						<td align="center"><?=$item['cash']!=0 ? number_format($item['cash']) : '-'?></td>
						<td align="center"><?=$item['point']!=0 ? number_format($item['point']) : '-'?></td>
						<td align="center"><?=!empty($item['subject']) ? $item['subject'] : '유료결제'?></td>
					</tr>
<?	} ?>
				</tbody>
				<tfoot>
					<tr>
						<td colspan="14">
							<?// include_once $_SERVER['DOCUMENT_ROOT'].'/include/board/page_navi.php'; ?>
						</td>
					</tr>
				</tfoot>
			</table>
		</div>

		<div>
			<h2>결제 내역</h2>
			<table class="basicTable" width="100%" cellpadding="2" cellspacing="1" border="0">
				<thead>
					<tr>
						<th>결제일시</th>
						<th>결제내역</th>
						<th>결제금액</th>
						<th>결제수단</th>
					</tr>
				</thead>
				<tbody>
<?	foreach ($payment_list as $item) { ?>
					<tr>
						<td align="center"><?=$item['create_dt']?></td>
						<td align="center"><?=$item['pname']?></td>
						<td align="center"><?=$item['pgcode']?></td>
						<td align="center"><?=number_format($item['amt'])?></td>
					</tr>
<?	} ?>
				</tbody>
				<tfoot>
					<tr>
						<td colspan="14">
							<?// include_once $_SERVER['DOCUMENT_ROOT'].'/include/board/page_navi.php'; ?>
						</td>
					</tr>
				</tfoot>
			</table>
		</div>
	</div>
	<!--// Contents -->
</div>
</body>
</html>